Electronic device for editing video using objects of interest and operating method thereof

ABSTRACT

A method and an electronic device are provided for editing video using objects of interest included in the video. An electronic device includes a camera, a memory, and a processor. The processor may obtain first video data through the camera, while obtaining the first video data, determine a first object of interest in a plurality of image frames included in the first video data, store, in the memory, second video data generated from the first video data based on the first object of interest, after generating the second video data, receive a user input for determining a second object of interest, different from the first object of interest, in the plurality of the image frames included in the first video data, and in response to receiving the user input, store, in the memory, third video data generated from the first video data based on at least the second object of interest.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a Bypass continuation application of InternationalApplication No. PCT/2021/018548, which was filed on Dec. 8, 2021, and isbased on and claims priority under 35 U.S.C. § 119 to Korean PatentApplication No. 10-2020-0181101, filed in the Korean IntellectualProperty Office on Dec. 22, 2020, the entire disclosure of each of whichis incorporated by herein reference.

BACKGROUND 1. Field

The disclosure relates generally video editing, and more particularly,to a method and apparatus for editing video using objects of interestincluded in the video.

2. Description of the Related Art

As functions of an electronic device, e.g., a mobile device, diversify,the demand for improved photographing and/or video shooting functionsusing the mobile device are increasing. For example, a mobile device mayperform various image capturing functions and image editing functions.

According to an auto framing technology, a mobile device may detect anobject of interest, such as a person being filmed in a video, andacquire a digital zoom video based on a detection result. The mobiledevice may also obtain a digital zoom video by enlarging or reducing animage frame based on the object of interest in each image frame throughthe auto framing technology. Through the use of an auto framingtechnology, even if the mobile device is in a fixed position, it mayobtain video generated based on the object of interest.

According to a conventional auto framing technology, an electronicdevice may obtain a digital zoom video based on an object of interest,which is different from a user's intended object while filming a video.If the electronic device obtains a video different from the user'sintention, it may be difficult for the electronic device to obtain adigital zoom video based on the user's intended object by modifying thestored digital zoom video.

SUMMARY

The disclosure is provided to address at least the above-mentionedproblems and/or disadvantages and to provide at least the advantagesdescribed below.

Accordingly, an aspect of the disclosure is to provide an apparatus andmethod in which, even after obtaining a digital zoom video based on anobject of interest that is different from a user's intended object, anelectronic device may generate a new digital zoom video based on theuser's intended object.

Another aspect of the disclosure is to provide an apparatus and methodthat obtain a new digital zoom video without modifying an object ofinterest or a region of interest in each image frame.

In accordance with an aspect of the disclosure, an electronic device isprovided, which includes a camera, a memory, and a processor. Theprocessor is configured to obtain first video data through the camera,while obtaining the first video data, set a first object of interest ina plurality of image frames included in the first video data, storesecond video data generated based on the first object of interest fromthe first video data in the memory, after generating the second videodata, receive a user input which sets a second object of interestdifferent from the first object of interest in the plurality of theimage frames included in the first video data, and in response toreceiving the user input, store third video data generated based on atleast the second object of interest from the first video data in thememory.

In accordance with another aspect of the disclosure, a method isprovided for an electronic device. The method includes obtaining firstvideo data through a camera included in the electronic device, while theobtaining first video data, setting a first object of interest in aplurality of image frames included in the first video data, storingsecond video data generated based on the first object of interest fromthe first video data in a memory included in the electronic device,after generating the second video data, receiving a user input whichsets a second object of interest different from the first object ofinterest in the plurality of the image frames included in the firstvideo data, and in response to receiving the user input, storing thirdvideo data generated based on at least the second object of interestfrom the first video data in the memory.

In accordance with another aspect of the disclosure, an electronicdevice is provided, which includes a camera, a memory, and a processor.The processor is configured to, using a first application, obtain firstvideo data through the camera, sets a first object of interest in aplurality of image frames included in the first video data, and storessecond video data generated based on the first object of interest fromthe first video data in the memory second, and using a secondapplication, receive a user input which sets a second object of interestdifferent from the first object of interest in the plurality of theimage frames included in the first video data, and stores third videodata generated based on at least the second object of interest from thefirst video data in the memory.

BRIEF DESCRIPTION OF DRAWINGS

The above and other aspects, features and advantages of certainembodiments of the disclosure will be more apparent from the followingdetailed description, taken in conjunction with the accompanyingdrawings, in which:

FIG. 1 illustrates an electronic device according to an embodiment;

FIG. 2 illustrates a configuration for generating video data based on aset object of interest, in an electronic device according to anembodiment;

FIG. 3 is a flowchart illustrating a method for generating video databased on a set object of interest, in an electronic device according toan embodiment;

FIG. 4 illustrates first video data obtained at an electronic device,second video data, and a third video data generated based on a setobject of interest according to an embodiment;

FIG. 5 is a flowchart illustrating a method for obtaining and storingkey frame information in an electronic device according to anembodiment.

FIG. 6 illustrates image frames included in a key frame according to anembodiment;

FIG. 7 is a flowchart illustrating a method obtaining third video datausing key frame information in an electronic device according to anembodiment;

FIG. 8 illustrates a region of interest based on different objects ofinterest in an electronic device according to an embodiment;

FIG. 9 illustrates a process of obtaining third video data using keyframe information in an electronic device according to an embodiment;

FIG. 10 is a flowchart illustrating a method for setting an object ofinterest before acquiring video data in an electronic device accordingto an embodiment;

FIG. 11 illustrates a process of setting an object of interest beforeacquiring video data in an electronic device according to an embodiment;

FIG. 12 is a signal flow diagram illustrating a method using a firstapplication in an electronic device according to an embodiment;

FIG. 13 is a signal flow diagram illustrating a method using a firstapplication in an electronic device according to an embodiment;

FIG. 14 is a signal flow diagram illustrating a method using a secondapplication in an electronic device according to an embodiment;

FIG. 15 illustrates an electronic device in a network environment,according to an embodiment; and

FIG. 16 illustrates a camera module, according to an embodiment.

DETAILED DESCRIPTION

Hereinafter, embodiments of the disclosure will be described in detailwith reference to accompanying drawings. Descriptions of well-knownfunctions and constructions are omitted for the sake of clarity andconciseness.

FIG. 1 illustrates an electronic device according to an embodiment.

Referring to FIG. 1 , a display 110 is provided in a front surface of anelectronic device 100. The display 110 may occupy most of the frontsurface of the electronic device 100. The front surface of theelectronic device 100 also includes a bezel area 120 surrounding atleast some edges of the display 110.

In the example of FIG. 1 , the display 110 includes a flat area 110 anda curved area 112 extending from the flat area 111 to a side surface ofthe electronic device 100. While the curved area 112 is illustrated ononly one side (i.e., the left side) of the electronic device 100 in FIG.1 , a curved area may also be formed on the right side. Other variationsare also possible. For example, the display 110 may include the flatarea 111 without the curved area, or the curved area 112 may be extendedto a rear surface of the electronic device 100, and the electronicdevice 100 may include an additional flat area.

A first area 140 of the display 110 includes a fingerprint sensor 141for fingerprint recognition. The fingerprint sensor 141, which isdisposed in a layer below the display 110, when viewing the display 110,may be disposed not to be viewed by a user or to be viewed hardly. Inaddition, a sensor for an additional user and/or biometricauthentication may be disposed in another area of the display 110. Thesensor for the user and/or the biometric authentication may be disposedin one area of the bezel 120. For example, an infrared (IR) sensor foriris authentication may be exposed through one area of the display 110,or may be exposed through one area of the bezel 120.

A sensor 143 is included in an area of the bezel 120. Alternatively, thesensor 14 may be included in an area of the display 110. The sensor 143may be for distance detection and/or object detection. The sensor 143may be disposed relatively close to a camera module (e.g., a frontcamera 131 or a rear camera 132) or may be formed as a single modulewith the camera module. The sensor 143 may operate as at least part ofan IR camera (e.g., a time of flight (TOF) camera, a structured lightcamera, etc.) or may operate as at least part of a sensor module.

The front surface of the electronic device 100 includes the front camera131. While FIG. 1 illustrates the front camera 131 being exposed throughthe display 110, alternatively, the front camera 131 may be exposedthrough the bezel 120.

The display 110 may include at least one or more of the sensor module,the camera module (e.g., the front camera 131 or the rear camera 132),and a light emitting device (e.g., a light emitting diode (LED)), on arear surface of a screen display area (e.g., the flat area 111 and/orthe curved area 112).

The camera module may be included behind at least one of the frontsurface, the side surface, and/or the rear surface of the electronicdevice 100. For example, the front camera 131 may not be visuallyexposed to the flat area 111, and may include a hidden under displaycamera (UDC).

The electronic device 100 may include one or more front cameras 131,e.g., a first front camera and a second front camera. The first frontcamera and the second front camera may be the same type of cameras ormay be different types of cameras.

The electronic device 100 may support various functions related to adual camera through the two front cameras (e.g., three dimensional (3D)filming, autofocus (AF), etc.).

The rear surface of the electronic device 100 includes the rear camera132. The rear camera 132 may be exposed through a camera area 130 of arear cover 160. The electronic device 100 may include a plurality ofrear cameras disposed in the camera area 130, e.g., a first rear camera,a second rear camera, and a third rear camera. The first rear camera,the second rear camera, and the third rear camera may have differentspecifications. For example, the first rear camera and the second rearcamera and/or the third rear camera may be different from each other inat least one of a field of view (FOV), pixels, an aperture, opticalzoom/digital zoom support, optical image stabilization (OIS) support, atype and/or an arrangement of a lens set included in each camera. Forexample, the first rear camera may have a standard lens, the second rearcamera may have a wide-angle lens, and the third rear camera may have atelephoto lens. Herein, descriptions on functions or characteristics ofthe front camera may also be applied to the rear camera, and vice versa.

The camera area 130 includes a flash 145, and may additionally includevarious hardware or sensors for assisting the photographing, such as adistance sensor for detecting a distance between a subject and theelectronic device 100.

The distance sensor may be disposed relatively close to the cameramodule (e.g., the front camera 131 and/or the rear camera 132) or may beformed as a single module with the camera module. For example, thedistance sensor may operate as at least part of the IR camera (e.g., aTOF camera, a structured light camera, etc.) or may operate as at leastpart of the sensor module. The TOF camera may operate as at least partof the sensor module for detecting the distance to the subject.

A first function key 151 is disposed on a side portion of the electronicdevice 100. The first function key 151 may be utilized for turningon/off the display 110 or turning on/off the electronic device 100.

A second function key 152 is provided on a left edge based on the frontsurface of the electronic device 100 may be utilized for controllingvolume or screen brightness of the electronic device 100.

An additional button or key may be disposed on the front surface or therear surface of the electronic device 100. For example, a physicalbutton or a touch button mapped to a designated function may be disposedin a lower area of the bezel 120 of the front surface.

The electronic device 100 in FIG. 1 corresponds to one example, and doesnot limit the type of the device to which the technical ideas describedin this disclosure are applied. The embodiments described in thisdisclosure may be applied to various user devices including a firstcamera module facing a first direction, and a second camera modulefacing a direction different from the first direction. The embodimentsdescribed in this disclosure may be applied to a foldable electronicdevice, a tablet, or a notebook. In addition, the embodiments describedin this disclosure may be applied even if it is possible to arrange thefirst camera module and the second camera module facing the samedirection to face different directions through rotation, folding, ordeformation of the device. For example, the electronic device 100 isillustrated as a bar type or a plate type terminal, but the embodimentsof this disclosure are not limited thereto. For example, an electronicdevice may be a part of a rollable electronic device, which allowsbending deformation of the display 110 that may be wound or rolled in atleast part, or accommodated into the electronic device 100. The rollableelectronic device may expand and use the screen display area byunfolding the display 110 or exposing a wider area of the display 110 tooutside, as controlled by the user. The display 110 may be a slide-outdisplay or an expandable display.

FIG. 2 illustrates a configuration for generating video data based on aset object of interest, in an electronic device according to anembodiment.

Referring to FIG. 2 , the electronic device may use hardware and/orsoftware modules to support functions for generating the video databased on the set object of interest. More specifically, a processor 240may drive modules by executing instructions stored in a memory 250. Theprocessor 240 may drive at least one module of a behavior patterndefining module 211, a region of interest calculating module 213, a keyframe extracting module 215, a tracking target recommending module 217,a video recording module 219, a main module 221, a region of interestreconfiguring module 223, a tracking target recommending module 227, ora video recording module 229 by executing the instructions stored in thememory 250.

Different software modules from those illustrated in FIG. 2 may beimplemented. For example, at least two modules of the software modulesillustrated in FIG. 2 may be integrated into one module, and/or onemodule may be divided into two or more modules.

In addition, hardware and the software module may share one function toimprove task performance. For example, the electronic device may includeboth an encoder implemented as hardware and an encoder implemented as asoftware module, part of data acquired through a camera 230 may beprocessed at the hardware encoder, and the remaining part may beprocessed at the software encoder.

The processor 240 may set a first object of interest in a plurality ofimage frames included in first video data through a first application210, generate second video data based on the first object of interestfrom the first video data, and store the second video data in the memory250. The processor 240 may extract at least one object included in theplurality of the image frames, set the first object of interest amongthe at least one object, determine a first region of interest includingthe first object of interest in the plurality of the image frames, andgenerate the second video data based on the first region of interest. Toexecute the first application 210, the processor 240 may drive at leastone module of the behavior pattern defining module 211, the region ofinterest calculating module 213, the key frame extracting module 215,the tracking target recommending module 217, or the video recordingmodule 219.

The behavior pattern defining module 211 may determine an overalloperation style of the first application 210. To extract at least oneobject from a plurality of image frames included in video data, thebehavior pattern defining module 211 may store features of the at leastone objects in the memory 250, and provide the features to anothermodule (e.g., the region of interest calculating module 213 or thetracking target recommending module 217). The at least one object mayinclude a point including a face of a designated person, an animal of adesignated type, or a sound over a reference volume. The behaviorpattern defining module 211 may store, in the memory 250, informationfor setting the first object of interest among the extracted at leastone object, and provide the information to another module. The behaviorpattern defining module 211 may set an object including a designatedface pre-stored in the memory 250 by another application (e.g., agallery application) among the extracted at least one object as thefirst object of interest.

The region of interest calculating module 213 may extract at least oneobject from the plurality of the image frames included in the firstvideo data, set the first object of interest among at least one object,and determine a first region of interest including the first object ofinterest in the plurality of the image frames. The region of interestcalculating module 213 may include at least one submodule. The submodulemay include at least one module of a face recognition module, an animallocation recognition module, an object tracking module, a sound basedlocation detection module, a body recognition module, an actionrecognition module, or a face expression recognition module. Thesubmodule may extract at least one object using at least one resultvalue of the camera 230, a microphone, and a sensor included in theelectronic device. The submodule may output information corresponding toa position and a size of the at least one object in the plurality of theimage frames.

The region of interest calculating module 213 may determine the firstregion of interest in the plurality of the image frames through theoutput result of the submodule. The region of interest calculatingmodule 213 may set the first object of interest based on information ofthe extracted at least one object and information obtained from thebehavior pattern defining module 211. The region of interest calculatingmodule 213 may determine the first region of interest including thefirst object of interest in the plurality of the image frames. If thereis one first object of interest, the region of interest calculatingmodule 213 may determine the region of interest to place the firstobject of interest at a center of the first region of interest. However,if there are two or more first objects of interest, the region ofinterest calculating module 213 may determine a first region ofinterest, such that the first region of interest includes all of thefirst objects of interest, or determine the first region of interest toinclude at least a part of the first objects of interest. The region ofinterest calculating module 213 may provide information of the firstregion of interest to another module (e.g., the key frame extractingmodule 215 or the video recording module 219).

The key frame extracting module 215 may obtain key frame informationbased on the information obtained from the region of interestcalculating module 213. The key frame information may includeinformation related to an image frame in which at least one object isextracted in a pre-designated manner among the plurality of the imageframes. The image frame corresponding to the key frame may include animage frame having a change over a specific level in the at least oneobject extracted from the plurality of the image frames. The key frameextracting module 215 may determine whether the at least one object isextracted in the pre-designated manner, through at least one of anobject movement direction, an object size, and an object amount. Forexample, when an object amount included in the plurality of the imageframes changes over a specific value within a specific time, the keyframe extracting module 215 may determine that the object is extractedin the pre-designated manner. As another example, if detecting a facepre-registered at the electronic device in the image frame, or if newlydetecting a position at which a sound is produced, the key frameextracting module 215 may determine that the object is extracted in thepre-designated manner.

The tracking target recommending module 217 may, before acquiring thefirst video data, display at least one object included in the imageacquired through the camera 230 or other tracking target not included inthe object on the display 110. The user may set a first object ofinterest based on the at least one object displayed on the display 110.For example, the electronic device may set the first object of interestby receiving a user input before acquiring the first video data, andgenerate second video data based on the set first object of interest.Alternatively, the tracking target recommending module 217 and theoperations of the tracking target recommending module 217 may beomitted. The tracking target recommending module 217 may obtain at leastone object information provided by the submodule included in the regionof interest calculating module 213, and display the information on thedisplay 110.

The video recording module 219 may store, in the memory 250, theinformation of the at least one object extracted from the plurality ofthe image frames included in the first video data, and/or the key frameinformation, together with the first video data obtained from the camera230, and store the second video data generated based on the first objectof interest in the memory 250. The video recording module 219 may store,in the memory 250, at least one of the first object of interestinformation, or the first region of interest information, together withthe first video data.

The processor 240 may receive a user input for setting a second objectof interest, which is different from the first object of interest, amongthe plurality of the image frames included in the first video datathrough a second application 220, generate third video data based atleast on the second object of interest from the first video data, andstore the third video data in the memory 250. The second application 220may be a separate application distinguished from the first application210. The first application 210 and the second application 220 may alsobe understood as different functions provided by the same application.For example, the first application 210 may film first video data(original) and generate second video data, and the second application220 may generate third video data from the first video data, aftergenerating the second video data.

The processor 240 may receive a user input for setting the second objectof interest among the at least one object extracted from the pluralityof the image frames included in the first video data, determine a secondregion of interest including at least the second object of interest, andgenerate the third video data based on the second region of interest. Toexecute the second application, the processor 240 may drive at least onemodule of the main module 221, the region of interest reconfiguringmodule 223, the tracking target recommending module 227, or the videorecording module 229.

The main module 221 may receive the first video data from the memory 250and display it on the display 110. The main module 221 may display onthe display 110 at least one information of the at least one objectinformation, the key frame information, the first object of interestinformation, or the first region of interest information, together withthe first video data. The user may modify the object of interest or theregion of interest in the image frame corresponding to the key framebased on the information displayed on the display 110, and the secondapplication 220 may obtain the third video data different from thesecond video data based on the modified object of interest or region ofinterest.

In response to receiving the user input that sets the second object ofinterest, the region of interest reconfiguring module 223 may determinethe second region of interest including the at least one second objectof interest. The description herein of the region of interestcalculating module 213 of the first application 210 may be also appliedto the region of interest reconfiguring module 223.

Upon receiving the user input that sets the second object of interest inthe image frame corresponding to the key frame, the region of interestreconfiguring module 223 may determine the second region of interest inthe image frame corresponding to the key frame, and determine the secondregion of interest including at least the second object of interest evenin the image frame not corresponding to the key frame. Through the userinput that modifies the object of interest or the region of interest inthe image frame corresponding to the key frame, the second application220 may obtain the third video data generated based on the modifiedobject of interest or region of interest.

The tracking target recommending module 227 may extract and display onthe display 110 at least one object in the plurality of the image framesincluded in the first video data. The tracking target recommendingmodule 227 may obtain information of the at least one object provided bythe submodule of the region of interest calculating module 213, anddisplay it on the display 110. Upon determining that the at least oneobject extracted in the first application 210 is not sufficient or notappropriate, the tracking target recommending module 227 may re-extractat least one object from the plurality of the image frames.

The video recording module 229 may store, in the memory 250, the thirdvideo data generated based on at least the second object of interest.The third video data may be other video data than the second video data.The video recording module 229 of the second application 220 may beintegrated with the video recording module 219 of the first application210 into one module, or may be configured as two modules which carry outthe same function.

The descriptions of the tracking target recommending module 217 and thevideo recording module 219 herein may also be applied to the trackingtarget recommending module 227 and the video recording module 229respectively.

The camera 230 may acquire video data, and provide the acquired videodata to the processor 240. The camera 230 may film at least one objectand provide the acquired first video data to the processor 240.

The processor 240 may include one or more processors. For example, theprocessor 240 may include at least one of an application processor (AP),an image signal processor (ISP), or a communication processor (CP).

The processor 240 may execute and/or control various functions supportedin the electronic device. For example, the processor 240 may execute anapplication by executing code written in a programing language stored inthe memory 250, and control various hardware. The processor 240 mayexecute the first application 210 supporting the filming function storedin the memory 250. The processor 240 may execute the camera 230 and setand support an appropriate shooting mode such that the camera 230 mayperform a user's intended operation.

The processor 240 may store, in the memory 250, the video data (e.g.,first video data) acquired through the camera 230, and display thefilming video data (e.g., second video data) as a preview on the display110.

The display 110 may display an execution screen of the first application210, the second application 220, or a gallery application executed bythe processor 240, or content (e.g., a still image or a moving image)stored in the memory 250. The processor 240 may display the video dataacquired through the camera 230 or at least some area of the image frameincluded the video data as the preview on the display 110 in real time.

The display 110 may be integrated with a touch panel. The display 110may support a touch function, and detect and provide a user input suchas a touch using a finger to the processor 240. The display 110 may beconnected with a display driver integrated circuit (DDIC) for drivingthe display 110, and the touch panel may be connected with a touchintegrated circuit (IC) for detecting touch coordinates and processing atouch related algorithm. The DDIC and the touch IC may be integrated ormay be separately formed. The DDIC and/or the touch IC may beelectrically connected with the processor 240.

The memory 250 may store the video data by the processor 240, and storevarious programming languages or instructions. In FIG. 2 , functionsperformed by the behavior pattern defining module 211, the region ofinterest calculating module 213, the key frame extracting module 215,the tracking target recommending module 217, the video recording module219, the main module 221, the region of interest reconfiguring module223, the tracking target recommending module 227, or the video recordingmodule 229 are carried out by executing, at the processor 240, theinstructions stored in the memory 250.

The electronic device may use one or more hardware processing circuitsto perform various functions and operations described herein. Forexample, an AP included in the electronic device, an ISP mounted in thecamera 230, a DDIC, a touch IC, a CP, or a hardware encoder may be usedfor implementations of various embodiments described herein.

In addition, the connections between the hardware and/or the softwareillustrated in FIG. 2 are for the sake of explanation, and do not limitthe flow and/or the direction of the data or the instruction. Thecomponents included in an electronic device may have various electricaland/or operational connections.

FIG. 3 is a flowchart illustrating a method for generating video databased on a set object of interest in an electronic device according toan embodiment. For example, the method of FIG. 3 is described below asbeing performed by the processor 240 in FIG. 2 .

Referring to FIG. 3 , in step 301, the processor 240 acquires firstvideo data through the camera 230.

In step 303, while the first video data is acquired, the processor 240sets a first object of interest in a plurality of image frames includedin the first video data.

The processor 240 may extract at least one object from the plurality ofthe image frames included in the first video data. The processor 240 mayextract at least one of a plurality of objects included in the pluralityof the image frames by analyzing the plurality of the image frames.

The processor 240 may set a first object of interest among the extractedat least one object. The processor 240 may set at least part of theextracted at least one object to the first object of interest. Forexample, the processor 240 may set a first object of the at least oneobject to the first object of interest.

In step 305, the processor 240 stores, in the memory 250, second videodata generated based on the first object of interest from the firstvideo data. The processor 240 may store the second video data in thememory 250 after the acquisition of the first video data ends, or maygenerate second video data based on the first object of interest, andstore the second video data in the memory 250, while the first videodata is acquired.

The processor 240 may determine a first region of interest including thefirst object of interest in the plurality of the image frames. Theprocessor 240 may determine the first region of interest and then placethe first object of interest at a center of the first region ofinterest. The processor 240 may generate the second video data based onthe first region of interest. For example, the processor 240 maygenerate the second video data by cropping the first region of interest.Cropping the first region of interest at the processor 240 may includecutting other portion than a portion corresponding to the first regionof interest in the plurality of the image frames.

The processor 240 may store the first video data in the memory 250,besides the second video data. The processor 240 may store, in thememory 250, information of the at least one object extracted from theplurality of image frames included in the first video data, togetherwith the first video data. The electronic device may perform steps 307through 309 using the at least one object information stored in thememory 250 together with the first video data.

The processor 240 may store, in the memory 250, at least one informationof the first object of interest information or the first region ofinterest information, together with the at least one object information.

While acquiring the first video data, the processor 240 may displaysecond video data on the display 110. While acquiring the first videodata, the processor 240 may generate the second video data based on thefirst object of interest, and display the second video data on thedisplay 110. During the video recording, the user may receive the secondvideo data, which is a digital zoom video, according to an auto framingtechnology, as the preview. Alternatively, while acquiring the firstvideo data, the processor 240 may display the first video data on thedisplay 110 or may display the first video data and the second videodata together on the display 110.

In step 307, after generating the second video data, the processor 240receives a user input for setting a second object of interest, which isdifferent from the first object of interest, in the plurality of theimage frames included in the first video data.

The processor 240 may receive a user input for setting an object notincluded in the first object of interest among at least one objectincluded in the plurality of the image frames to be the object ofinterest and/or a user input for releasing at least part of the objectincluded in the first object of interest from the object of interest.After the processor 240 sets the first object of the first object andthe second object extracted from the plurality of the image frames tothe first object of interest, the processor 240 may receive a user inputfor setting the second object to the object of interest. In this case,the processor 240 may determine the user input for setting both thefirst object and the second object to the second object of interest. Asanother example, the processor 240 may receive a user input forreleasing the first object from the object of interest, and setting thesecond object to the object of interest. In this case, the processor 240may determine the user input for setting only the second object to thesecond object of interest. The user input may include a touch input forthe first object or the second object received through the display 110.

In step 309, in response to receiving the user input, the processor 240stores, in the memory 250, third video data generated based at least onthe second object of interest from the first video data.

The processor 240 may determine a second region of interest including atleast the second object of interest in the plurality of the imageframes. For example, if the processor 240 determines the user input forsetting the first object and the second object to the second object ofinterest, the processor 240 may determine the second region of interestincluding the first object and the second object. As another example, ifthe processor 240 determines the user input for setting the secondobject to the second object of interest, the processor 240 may determinethe second region of interest including the second object.

The processor 240 may generate third video data based on the secondregion of interest, e.g., by cropping the second region of interest inthe plurality of the image frames included in the first video data.

The processor 240 may store the third video data in the memory 350. Thethird video data may be different video data from the second video data.For example, a plurality of image frames included in the third videodata may be generated by cropping a different region from a plurality ofimage frames included in the second video data among the plurality ofthe image frames included in the first video data. The second video datamay be generated based on the first object from the first video data,and the third video data may be generated based on the first object andthe second object from the first video data.

The processor 240 may store the third video data in the memory 250 anddelete the second video data from the memory 250. For example, since thesecond video data is the video data generated based on the differentobject of interest (e.g., the first object of interest) from the object(e.g., the second object of interest) to be set to the object ofinterest by the user, the third video data is stored in the memory 250and accordingly the second video data may be deleted from the memory250.

The processor 240 may store the third video data in the memory 250 anddelete the first video data from the memory 250. If the first video datais deleted from the memory 250, generating the third video data usingthe first video data may be no longer possible. Accordingly, theprocessor 240 may output a related notification. For example, theprocessor 240 may display a user interface (UI) including details on thedisplay 110, or output an audio notification through a speaker, suchthat the user may select whether to delete the first video data.

FIG. 4 illustrates first video data acquired at an electronic device,second video data, and third video data generated based on a set objectof interest according to an embodiment.

Referring to FIG. 4 , a plurality of image frames 410 a, 410 b, and 410c are included in first video data 410. The processor 240 may acquirethe first video data 410 through the camera 230.

While acquiring the first video data 410, the processor 240 may extractat least one object included in the plurality of the image frames 410 a,410 b, and 410 c. For example, the processor 240 may extract a firstobject 411 and a second object 412 from the image frames 410 a, 410 b,and 410 c. The processor 240 may store information of the first object411 and the second object 412 in the memory 250, together with the firstimage data 410.

The processor 240 may use the output result of the submodule of theregion of interest calculating module 213 to extract at least one objectincluded in the image frames 410 a, 410 b, and 410 c. The processor 240may extract the first object 411 and the second object 412 using anoutput result of a body recognition module among the submodules of theregion of interest calculating module 213. The submodule may extract thefirst object 411 and the second object 412 using at least one resultvalue of the camera 230, the microphone, and the sensor included in theelectronic device.

The submodule may output information corresponding to a position and asize of at least one object in the image frames 410 a, 410 b, and 410 c.The submodule may output an extraction result of the at least one objectin a rectangular form positioned inside the image frame 410 a, 410 b, or410 c. The information of the rectangular form may include positioninformation of four vertexes of the rectangle based on a full resolutionof the image frame 410 a, 410 b, or 410 c. The processor 240 may store,in the memory 250, the position information of the four vertexes of therectangle corresponding to the extraction result of the first object 411and the position information of the four vertexes of the rectanglecorresponding to the extraction result of the second object 412 in eachimage frame 410 a, 410 b, and 410 c.

A plurality of image frames 420 a, 420 b, and 420 c are provided inwhich a first region of interest 422 is determined, if the first object411 is set to the first object of interest 421 in the first video data410.

More specifically, the processor 240 may set the first object ofinterest 421 in the plurality of the image frames 410 a, 410 b, and 410c. The processor 240 may determine the first region of interest 422including the first object of interest 421 in the image frames 420 a,420 b, and 420 c. The processor 240 may store information of the firstobject of interest 421 and information of the region of interest 422 inthe memory 250, together with the information of the first video data410, the first object 4111, and the second object 412.

The information of the first region of interest 422 may includerectangle information corresponding to a position and a size of thefirst region of interest 422 in the image frame 420 a, 420 b, or 420 c.The information of the first region of interest 422 may include positioninformation of four vertexes of the rectangle based on the fullresolution of the image frame 420 a, 420 b, or 420 c. The processor 240may store, in the memory 250, the position information of the fourvertexes of the rectangle corresponding to the first region of interest422 in each image frame 420 a, 420 b, and 420 c.

The processor 240 may determine the first region of interest 422 toplace the first object of interest 421 at a center of the first regionof interest 422. The processor 240 may determine the first region ofinterest 422, such that the first region of interest 422 does not exceeda range of the plurality of the image frames 410 a, 410 b, and 410 cincluded in the first video data 410. The first region of interest 422may have the same aspect ratio as the plurality of the image frames 410a, 410 b, and 410 c included in the first video data 410.

The processor 240 may determine the first region of interest 422 suchthat an area ratio occupied by the first object of interest 421 in thefirst region of interest 422 is relatively constant. To determine thefirst region of interest 422 such that a boundary of the first object ofinterest 421 is not within a present distance to a boundary of the firstregion of interest 422, the processor 240 may determine the first regionof interest 422 to have a margin of a specific length inside the firstregion of interest 422.

A plurality of image frames 430 a, 430 b, and 430 c are included insecond video data 430, which is generated based on the first object ofinterest 421 from the first video data 410.

The processor 240 may generate the second video data 430 based on thefirst region of interest 422 including the first object of interest 421,and store the second video data 430 in the memory 250. The processor 240may generate the image frames 430 a, 430 b, and 430 c included in thesecond video data 430 by cropping the first region of interest 422 inthe plurality of the image frames 410 a, 410 b, and 410 c included inthe first video data 410.

The second video data 430 may be data generated based on the firstobject of interest 421 (e.g., the first object 411). The second videodata 430 may be data generated by cropping the plurality of the imageframes included in the first video data 410 to place the first object411 at the center of the image frame.

While acquiring the first video data 410 through the camera 230, theprocessor 240 may generate the second video data 430, and display thesecond video data 430 as the preview on the display 110. Alternatively,while acquiring the first video data 410 through the camera 230, theprocessor 240 may display the first video data 130 on the display 110,or display the first video data 410 and the second video data 430together on the display 110.

A plurality of image frames 440 a, 440 b, and 440 c are provided, inwhich a second region of interest 432 is determined, if the first object411 and the second object 412 are set to a second object of interest 431in the first video data 410.

More specifically, after generating the second video data 430, theprocessor 240 may receive a user input for setting the second object 412to the object of interest. The processor 240 may determine the userinput which sets the first object 411 and the second object 412 includedin the image frames 410 a, 410 b, and 410 c to the second object ofinterest 431.

In response to receiving the user input that sets the first object 411and the second object 412 to the second object of interest 431, theprocessor 240 may set the second region of interest 432 including atleast the second object of interest 431 (e.g., the first object 411 andthe second object 412).

A plurality of image frames 450 a, 450 b, and 450 c are included inthird video data 450, which is generated based on the second object ofinterest 431 from the first video data 410.

The processor 240 may generate the third video data 450 based on thesecond region of interest 432 including at least the second object ofinterest 431, and store the third video data 450 in the memory 250. Forexample, the processor 240 may generate the image frames 450 a, 450 b,and 450 c included in the third video data 450 by cropping the secondregion of interest 432 in the plurality of the image frames 410 a, 410b, and 410 c included in the first video data 410.

The third video data 450 may be generated based on the second object ofinterest 431 (e.g., the first object 411 and the second object 412). Thethird video data 450 may be generated by cropping the image frames 410a, 410 b, and 410 c included in the first video data 410 to placecenters of the first object 411 and the second object 412 at the centerof the image frame, or to place both the first object 411 and the secondobject 412 within the image frame.

The second video data 430 and the third video data 450 may be differentvideo data. For example, the processor 240 sets the first object 411 tothe first object of interest 421 using the first application 210, andgenerates the second video data 430 based on the first object ofinterest 421, but the user may intend to acquire a video including boththe first object 411 and the second object 412. The processor 240, whichstores the first video data 410 as well as the second video data 430 inthe memory 250, may acquire the third video data 450 including both thefirst object 411 and the second object 412 using the second application220.

FIG. 5 is a flowchart illustrating a method for obtaining and storingkey frame information in an electronic device according to anembodiment. For example, the method of FIG. 5 is described below asbeing performed by the processor 240 in FIG. 2 , and may be performed instep 301 of FIG. 3 .

Referring to FIG. 5 , in step 501, while acquiring first video data, theprocessor 240 obtains key frame information corresponding to a key frameamong a plurality of image frames included in the first video data. Thekey frame may be a frame corresponding to an image frame where at leastone object is extracted from the plurality of the image frames in apre-designated manner.

The processor 240 may determine the image frame where at least oneobject is extracted from the plurality of the image frames in thepre-designated manner as the key frame. For example, the image framecorresponding to the key frame may include an image frame in which theat least one object extracted from the plurality of the image framesincluded in the first video has a change over a specific level.

The processor 240 may determine whether the at least one object isextracted in the pre-designated manner, through at least one of anobject movement direction, an object size, and an object amount. Forexample, if the object amount included in the plurality of the imageframes changes over a specific value within a specific time, theprocessor 240 may determine that the object has been extracted in thepre-designated manner. As another example, if detecting a facepre-registered at the electronic device in the plurality of the imageframes, or if newly detecting a position of a sound, the processor 240may determine that the object has been extracted in the pre-designatedmanner.

In step 503, the processor 240 stores key frame information togetherwith the first video data in the memory 250. The processor 240 maystore, in the memory 250, at least part of at least one objectinformation, key frame information, first object of interestinformation, and first region of interest information, together with thefirst video data.

FIG. 6 illustrates image frames included in a key frame according to anembodiment.

Referring to FIG. 6 , while acquiring the first video data through thecamera 230, the processor 240 may extract a first object 601 and asecond object 602 in a plurality of the image frames 600 a, 600 b, and600 c.

While acquiring the first video data, the processor 240 may obtain keyframe information corresponding to an image frame in which at least oneobject is extracted from the plurality of the image frames in apre-designated manner. The processor 240 may obtain the key frameinformation through an object amount extracted from the image frame. Forexample, an image frame corresponding to a timing at which the objectamount extracted from the image frame changes may be included in the keyframe. As another example, an image frame corresponding to a timingafter a specific time passes from the timing at which the object amountextracted from the image frame changes may be included in the key frame.

The processor 240 may extract the first object 601 in the image frame600 a, and extract the first object 601 and the second object 602 in theimage frames 600 b and 600 c. If an image frame in which the processor240 first extracts the second object 602 is the image frame 600 b, theimage frame 600 b may correspond to the key frame. Alternatively, theprocessor 240 may determine the image frame 600 c, which is capturedafter a specific time passes from the capturing of the image frame 600 bin which the second object 602 is extracted first, as corresponding tothe key frame.

The processor 240 may store key frame information together with thefirst video data in the memory 250. For example, the processor 240 maystore, in the memory 250, information that at least one of the imageframes 600 b or 600 c corresponds to the key frame.

FIG. 7 is a flowchart illustrating a method for obtaining third videodata using key frame information in an electronic device according to anembodiment. For example, the method in FIG. 7 is described below asbeing performed by the processor 240 in FIG. 2 , and the method may beperformed in step 503 of FIG. 5 .

Referring to FIG. 7 , in step 701, the processor 240 receives a userinput for setting a second object of interest in an image framecorresponding to a key frame among a plurality of image frames includedin first video data.

The processor 240 may receive a user input for setting a second objectof interest in an image frame corresponding to a key frame, using thekey frame information described in relation to FIG. 5 . To generatethird video data different from second video data, the electronic devicemay receive the user input for setting the second object of interest inthe key frame, without having to separately receive a user input forsetting the second object of interest in the plurality of the imageframes included in the first video data.

The processor 240 may receive a user input for changing a region ofinterest, besides the user input for setting the second object ofinterest in the image frame corresponding to the key frame. For example,the processor 240 may set the second object of interest which is thesame as the first object of interest, and receive a user input thatchanges at least one of a size or a position of the second region ofinterest. The user input may include a touch input (e.g., drag, drop)through the display 110.

As another example, the processor 240 may receive a user input forsetting a second object different from the first object of interest,determine and display on the display 110 a second region of interestincluding the second object of interest, and receive a user input forchanging the second region of interest. The user may modify at least oneof the object of interest or the region of interest in the image framecorresponding to the key frame.

The processor 240 may receive a user input for adding, removing, ormodifying the key frame, besides the user input for setting the secondobject of interest. For example, the processor 240 may receive a userinput that includes an image frame not included in the key frameinformation stored in step 503 of FIG. 5 into the key frame information,receive a user input which excludes an image frame included in the keyframe information stored in step 503 of FIG. 5 from the key frameinformation, or receive a user input for including a frame before orafter an image frame included in the key frame information stored instep 503 of FIG. 5 into the key frame information. If the processor 240receives the user input for adding a key frame, the processor 240 mayreceive a user input for setting the second object of interest, even inan image frame corresponding to the added key frame.

In step 703, the processor 240 generates third video data, in responseto receiving the user input.

The processor 240 may determine the second region of interest includingthe second object of interest in the image frame corresponding to thekey frame in response to the user input. The processor 240 may determinethe second region of interest including the second object of interesteven in the image frame not corresponding to the key frame. For example,the processor 240 may calculate the second region of interest, even inthe image frame not corresponding to the key frame, by driving theregion of interest reconfiguring module 223. If receiving the user inputin the image frame corresponding to the key frame, the electronic devicemay reconfigure the second region of interest in the plurality of theimage frames including the image frame not corresponding to the keyframe.

Because the third video data may be generated through the user inputthat sets the second object of interest in the image frame correspondingto the key frame, although the user does not set the second object ofinterest in the plurality of the image frames, it may be easy togenerate video data based on a new object of interest.

FIG. 8 illustrates a region of interest based on different objects ofinterest in an electronic device according to an embodiment.

Referring to FIG. 8 , regions of interest are determined in executionscreens 810, 820, and 830 according to a different object of interest inan image frame corresponding to a key frame, and the second application220 for modifying the region of interest.

More specifically, the processor 240 displays a progress bar 803, and akey frame indication 804 in the execution screen of the secondapplication 220 on the display 110. The processor 240 may display theprogress bar 803 in a bar shape indicating time flow of first videodata. The processor 240 may display the key frame indication 804 tocorrespond to a timing of the image frame included in the key frameamong a plurality of image frames in the first video data. For example,the processor 240 may display the key frame indication 804 in a ‘V’shape inside the progress bar 803.

The processor 240 may display, on the display 110, an image framecorresponding to a corresponding key frame through a user input for thekey frame indication 804. The user may touch the key frame indication804, and the processor 240 may display on the display 110 the imageframe corresponding to the corresponding key frame 804 in response toreceiving the touch input.

Execution screen 810 includes a region of interest 811 with the firstobject 801 and the second object 802 set to the object of interest inthe execution screen of the second application 220. The processor 240may determine the region of interest 811 to include both the firstobject 801 and the second object 802. If the first object 801 and thesecond object 802 are set to the first object of interest in the firstapplication 110, the first region of interest may be the region ofinterest 811. The processor 240 may display the execution screen 810 onthe display 110 before receiving a user input that sets a second objectof interest. As another example, if the processor 240 receives a userinput that sets the first object 801 and the second object 802 to thesecond object of interest, the second region of interest may be the sameas the region of interest 811. The processor 240 may display theexecution screen 810 on the display 110, after receiving the user input.

The processor 240 may store, in the memory 250, first object of interestinformation and/or first region of interest information together withfirst video data. Hence, in the execution screen of the secondapplication 220, the processor 240 may display, on the display 110, thefirst object of interest and the first region of interest together withthe image frame included in the first video data before receiving aseparate user input.

Execution screen 820 includes a region of interest 821 with the firstobject 801 set to the object of interest in the second application 220.For example, if the processor 240 receives a user input that sets thefirst object 801 to the second object of interest, the processor 240 maydetermine the second region of interest (e.g., the region of interest821) including the first object 801.

Execution screen 830 includes a region of interest 831 with the secondobject 802 set to the object of interest in the second application 220.For example, if the processor 240 receives a user input that sets thesecond object 802 to the second object of interest, the processor 240may determine the second region of interest 831 including the secondobject 802.

FIG. 9 illustrates a process of obtaining third video data using keyframe information in an electronic device according to an embodiment.

Referring to FIG. 9 , execution screen 910 of an image frame notcorresponding to a key frame in second application 220. The processor240 may display a progress bar 903, and a key frame indication 904 onthe display 110.

The processor 240 may determine a region of interest 912 including anobject of interest 911, and distinguish and display, on the display 110,the region of interest 912 and a region that is not the region ofinterest 912 in the execution screen 910 of the second application 220.For example, the processor 240 may distinguish and display, on thedisplay 110, the region of interest 912 and the region that is not theregion of interest 912 through shadow or lines.

The processor 240 may deactivate a function for modifying the object ofinterest 911 or modifying the region of interest 912 in the image framenot corresponding to the key frame. For example, the processor 240 maynot display a size control handle 905 at four vertexes of the region ofinterest 912 in the execution screen 910 of the second application 220displayed on the display 110, in the image frame not corresponding tothe key frame.

The processor 240 may receive a user input for adding even an imageframe not corresponding to the key frame into the key frame. Forexample, the processor 240 may determine the user input, if receiving atouch input to a separate UI displayed on the display 110, or receivinga touch input over a specific time to at least part of the executionscreen of the second application 220. Upon receiving the user input thatadds the key frame, the processor 240 may change from the executionscreen 910 to the execution screen 930.

Execution screen 920 may be displayed on the display 110 in the imageframe corresponding to the key frame in the second application 220.

The processor 240 may activate the function for modifying an object ofinterest 921 or modifying the region of interest 922 in the image framecorresponding to the key frame. For example, the processor 240 maydisplay the size control handle 905 at four vertexes of the region ofinterest 922 in the execution screen 920 of the second application 220displayed on the display 110, in the image frame corresponding to thekey frame. If receiving a user input (e.g., drag, drop) to the sizecontrol handle 905, the processor 240 may change a position and a sizeof the region of interest 922, and display the changed region ofinterest 922 on the display 110. The user may modify the size of theregion of interest 922 through the user input to the size control handle905.

The processor 240 may change the object of interest 921 through a userinput to the object of interest 921 in the image frame corresponding tothe key frame. For example, if receiving a user input (e.g., a touchinput) to at least a partial object of the object of interest 921, theprocessor 240 may release the object from the object of interest. Ifre-receiving a user input for the object, the processor 240 may set theobject to the object of interest. The user may set the second object ofinterest through a touch input to a designated object.

Execution screen 930 of the second application 220 may be displayed onthe display 110 in a corresponding image frame, if a user input foradding an image frame not corresponding to the key frame into the keyframe is received.

If there is a user input for adding an image frame not included in thekey frame information into the key frame, the processor 240 may includea corresponding image frame into the key frame information. To modifythe object of interest 911 or the region of interest 912, even in theimage frame not included in the key frame, the user may add acorresponding image frame into the key frame information.

Even in the image frame added to the key frame by the user input, theprocessor 240 may display the size control handle 905 for adjusting thesize of the region of interest 912. The user may adjust the size and theposition of the region of interest 912 through a touch input (e.g.,drag, drop) to the size control handle 905.

Even in the image frame added into the key frame by the user input, theprocessor 240 may receive a user input for modifying the object ofinterest 911 (e.g., releasing from the object of interest or setting asthe object of interest).

With respect to the key frame detected by the processor 240 and the keyframe according to the user's input, the processor 240 may displaydifferent key frame indications on the display 110. The processor 240may display the key frame indication 904 for the key frame detected bythe processor 240, and a key frame indication 906 for the key frameaccording to the user's input. For example, the processor 240 maydisplay the key frame indication 904 in red, and the key frameindication 906 in blue on the display 110.

FIG. 10 is a flowchart illustrating a method for setting an object ofinterest before acquiring video data in an electronic device accordingto an embodiment. For example, the method in FIG. 10 is described asbeing performed by the processor 240 in FIG. 2 .

Referring to FIG. 10 , in step 1001, the processor 240 acquires an imageincluding at least one object through the camera 230, before acquiringfirst video data. The image may correspond to a still image or a movingimage including at least one object.

The processor 240 may extract at least one object from at least oneimage frames included in the image.

In step 1003, the processor 240 displays the image on the display 110.

The processor 240 may display on the display 110 information of theextracted at least one object together with the image.

In step 1005, the processor 240 receives a user input for setting afirst object of interest among the at least one object included in theimage.

The processor 240 may receive a user input for setting a first object ofinterest among the at least one object displayed on the display 110. Theuser may set the first object of interest among the at least one objectdisplayed on the display 110.

The processor 240 may set a first object of interest based on the userinput, and generate second video data based on the first object ofinterest while acquiring the first video data, in relation to steps 303and 305 in FIG. 3 . The electronic device may obtain a separate imagebefore acquiring the first video data, and set the first object ofinterest based on the user input, such that the second video datagenerated while acquiring the first video data corresponds to video datagenerated by setting a user's intended object to the first object ofinterest.

The processor 240 may recommend another tracking target, which is notincluded in the image, as the first object of interest. For example, ifat least one object included in the image does not include an object tobe set to the first object of interest by the user, the processor 240may display on the display 110 other tracking targets among objects notincluded in the image, according to receiving a user input for receivingthe other tracking target. The processor 240 may display, on the display110, a button for the user input for receiving the other tracking targettogether with information of the at least one object, and display theother tracking target on the display 110, if receiving the user inputvia the button. For example, the other tracking target may include faceor animal information pre-stored through other application (e.g., agallery application) of the electronic device.

A display order of objects included in the other tracking target on thedisplay 110 may be determined based on at least one of the number oftimes of storing in the electronic device, similarity with at least oneobject extracted in the image, frequency of setting as the object ofinterest, and/or an order of objects recently included in the object ofinterest. However, the display order of the objects included in theother tracking target may also be determined according to differentcriteria.

FIG. 11 illustrates a procedure for setting an object of interest beforeacquiring video data in an electronic device according to an embodiment.

Referring to FIG. 11 , execution screen 1110 may correspond to a startscreen of the first application 210 displayed by the processor 240 onthe display 110. The processor 240 may display the execution screen 1110on the display 110, and then obtain an image including at least oneobjects.

Execution screen 1120 may be displayed by the processor 240 on thedisplay 110 by extracting at least one object included in the obtainedimage. The processor 240 may extract at least one object included in atleast one image frame included in the image by analyzing the image, anddisplay the extracted at least one object on the display 110. Forexample, the processor 240 may extract a first object 1121 and a secondobject 1122 in the image, and display them in a rectangular formtogether with the image.

The processor 240 may receive a user input for determining at least oneobject of the first object 1121 or the second object 1122 as a firstobject of interest in the execution screen 1120. For example, theprocessor 240 may receive the user input that sets the first object 1121as a first object of interest 1131. Upon receiving the user input, theprocessor 240 may display the execution screen 1130 on the display 110.

Upon receiving a user input to a ‘selection completed’ button, theprocessor 240 may set at least one object of interest which is setbefore the user input to the first object of interest, and perform step301 in FIG. 3 .

Execution screen 1130 of the first application 210 may be displayed onthe display 110, if the processor 240 receives the user input forsetting the first object of interest 1131.

The processor 240 may differently display a rectangle corresponding tothe first object of interest 1131 and a rectangle corresponding toanother object (e.g., the second object 1122), different than the firstobject of interest 1131, on the display 110. For example, the processor240 may display the first object of interest 1131 with solid lines, andthe second object 1122, which is not the first object of interest 1131,with dotted lines on the display 110. As another example, the processor240 may shade a region outside of a region which is set to the firstobject of interest 1131.

Execution screen 1140 may be displayed on the display 110, if theprocessor 240 receives a user input for an ‘add other tracking target’button 1123 in execution screen 1120. For example, if at least one ofthe first object 1121 or the second object 1122 included in the imageacquired through the camera 230 does not include an object to be set tothe first object of interest 1131, the user may touch the ‘add othertracking target’ button 1123 displayed on the display 110. As anotherexample, the processor 240 may display the execution screen 1140 on thedisplay 110 through an input to a separate physical button or a user'svoice input.

Upon receiving a user input to the ‘add other tracking target’ button1123, the processor 240 may display other tracking target 1143 on thedisplay 110. For example, the other tracking target 1143 may includeface or animal information pre-stored through another application (e.g.,a gallery application) of the electronic device.

A display order of objects included in the other tracking target 1143 onthe display 110 may be determined based on at least one of the number oftimes of storing in the electronic device, similarity with at least oneobject extracted in the image, frequency of setting as the object ofinterest, or an order of objects recently included in the object ofinterest. For example, since the first object 1121 and the second object1122 correspond to puppies, the processor 240 may display, on thedisplay 110, a puppy image that is pre-stored in the electronic devicefirst among the other tracking targets 1143.

Upon receiving a user input that sets at least one object of the othertracking targets 1143 to the first object of interest, the processor 240may generate second video data based on the first object of interest.

FIG. 12 is a signal flow diagram illustrating a method using a firstapplication in an electronic device according to an embodiment.

Referring to FIG. 12 , the processor 240 may obtain an image beforeobtaining first video data through the first application 210, display,on the display 110, at least one object included in the image or othertracking target not included in the image, and receive a user input forsetting a first object of interest among the at least one object or theother tracking target.

In step 1201, the electronic device may be in a standby state forreceiving a user input in. For example, the behavior pattern definingmodule 211 may wait for a user input for a tracking target search.

The behavior pattern defining module 211 may receive the user input forthe user's tracking target search in step 1202. For example, the userinput may include a touch input to a button (e.g., a UI, a soft button,etc.) of the tracking target search, or a voice input for the trackingtarget search.

The behavior pattern defining module 211 may request image acquisitionfrom the camera 230 based on the user input for the user's trackingtarget search in step 1203. Even if not receiving the user input for thetracking target search, the behavior pattern defining module 211 mayperform the image acquisition request and the following operations. Forexample, if the first application 210 is executed, the processor 240 mayperform the processes described above with reference to FIG. 10 and FIG.11 , even without a separate user input.

In step 1204, the camera 230 may provide an image to the behaviorpattern defining module 211. The image may correspond to an imageincluding at least one object, e.g., a still image or a moving image.

In step 1205, the behavior pattern defining module 211 may forward theimage to the tracking target recommending module 217.

In step 1206, the tracking target recommending module 217 may extract atleast one object in the obtained image. The tracking target recommendingmodule 217 may extract at least one object by analyzing at least oneimage frame included in the image obtained from the behavior patterndefining module 211.

If the tracking target recommending module 217 is unable to extract atleast one object included in the image, the behavior pattern definingmodule 211 may re-request the image acquisition (e.g., in step 1203)from the camera 230. Steps 1203 through 1206 may be repeated.

In step 1207, the tracking target recommending module 217 may provideinformation of the extracted at least one object to the behavior patterndefining module 211.

In step 1208, the behavior pattern defining module 211 may display theat least one object information on the display 110. For example, thebehavior pattern defining module 211 may display the object informationtogether with the image in a rectangle form on the display 110.

In step 1209, the electronic device may wait to receive a user input.For example, the behavior pattern defining module 211 may wait for theuser input which sets a first object of interest.

In step 1210, the behavior pattern defining module 211 may receive auser input that determines the first object of interest. The user mayset at least part of at least one object displayed on the display 110 tothe first object of interest.

The behavior pattern defining module 211 may set a tracking target,other than the at least one object extracted from the image, as thefirst object of interest. For example, the behavior pattern definingmodule 211 may display an ‘add other tracking target’ button (e.g., thebutton 1123 of FIG. 11 ) with at least one object on the display 110,and receive a touch input to the button. The behavior pattern definingmodule 211 may display another tracking target, which is the object notincluded in the image, on the display 110. The behavior pattern definingmodule 211 may set at least part of the other tracking target to thefirst object of interest.

In step 1211, the behavior pattern defining module 211 may storeinformation of the first object of interest. For example, based on thefirst object of interest, the processor 240 may generate second videodata from the first video data acquired through the camera 230.

FIG. 13 is a signal flow diagram illustrating a method using a firstapplication in an electronic device according to an embodiment. Forexample, the processor 240 may perform the method in FIG. 13 afterperforming the method in FIG. 12 , or, the processor 240 may omit themethod in FIG. 12 and perform the method in FIG. 13 instead.

Referring to FIG. 13 , the electronic device may wait to receive a userinput in step 1301. For example, the video recording module 219 may waitfor a user input for filming start.

In step 1302, the video recording module 219 may receive the user inputfor the filming start. For example, the user input may include a touchinput to a filing start button displayed on the display 110 or a voiceinput for the filming start.

In step 1303, the video recording module 219 may request first videodata acquisition from the camera 230.

In step 1304, the camera 230 may provide the first video data to thevideo recording module 219. The video recording module 219 may obtain,from the camera 230, at least one image frame among the plurality of theimage frames included in the first video data. For example, the camera230 may provide one image frame included in the first video data to thevideo recording module 219.

Steps 1304 through 1317 may be repeated for each image frame included inthe first video data.

In step 1305, the video recording module 219 may request region ofinterest calculation from the region of interest calculating module 213.

In step 1306, the region of interest calculating module 213 may requesta behavior pattern from the behavior pattern defining module 211. Thebehavior pattern stored in the behavior pattern defining module 211 maybe defaulted in the electronic device, and may be changed by user'smodification.

In step 1307, the behavior pattern defining module 211 may provide thebehavior pattern to the region of interest calculating module 213. Forexample, the behavior pattern may include at least one of whether to usea submodule designated in the submodules of the region of interestcalculating module 213, an object amount, which may be set to the objectof interest in the image frame, or sensitivity and response speed inextracting at least one object.

The operations of the region of interest calculating module 213requesting a behavior pattern from the behavior pattern defining module211 and receiving the behavior pattern may be performed only once inresponse to a user input to start capturing video. The region ofinterest calculating module 213 does not receive the behavior patternevery time the video recording module 219 obtains the image framesincluded in the first video data from the camera 230, and steps 1306 and1307 may be performed only once for one video capture.

In step 1308, the region of interest calculating module 213 maycalculate a region of interest. The region of interest calculatingmodule 213 may calculate the region of interest based on the behaviorpattern obtained from the behavior pattern defining module 211. Theregion of interest calculating module 213 may set a first object ofinterest in the image frame included in the first video data based onthe behavior pattern, and determine a first region of interest includingthe first object of interest.

In step 1309, the region of interest calculating module 213 may provideinformation of the region of interest to the key frame extracting module215. For example, the region of interest calculating module 213 mayprovide at least one object information to the key frame extractingmodule 215.

In step 1310, the region of interest calculating module 213 may alsoforward the region of interest information to the video recording module219.

In step 1311, the video recording module 219 may forward second videodata to the display 110, based on the obtained region of interestinformation. The video recording module 219 may obtain information ofthe first region of interest from the region of interest calculatingmodule 213, generate the second video data based on the first region ofinterest, and provide the second video data to the display 110.

In step 1312, the display 110 may display the second video data obtainedfrom the video recording module 219. The user may receive the secondvideo data as the preview during the video recording.

In step 1313, the key frame extracting module 215 may calculate a keyframe based on the region of interest information obtained from theregion of interest calculating module 213. Since the region of interestinformation includes the information of the at least one object includedin the image frame, the key frame extracting module 215 may determinewhether the at least one object is extracted from the image frame in apre-designated manner. For example, if the object amount extracted fromthe image frame included in the first video data is changed, the keyframe extracting module 215 may determine that a corresponding imageframe is included in the key frame.

In step 1314, the key frame extracting module 215 may provide key frameinformation to the video recording module 219.

In step 1315, the video recording module 219 may store the first videodata and the second video data in the memory 250. The video recordingmodule 219 may store in the memory 250 at least one image frame includedin the first video data, and image frames included in the second videodata generated based on the image frame. The video recording module 219may store in the memory 250 information of the at least one image frameextracted from the image frame included in the first video data and keyframe information together with the first video data. The videorecording module 219 may store, in the memory 250, the first object ofinterest information and the first region of interest informationtogether with the first video data.

In step 1316, the key frame extracting module 215 may provide the keyframe information to the display 110.

In step 1317, the display 110 may display the key frame information. Forexample, while obtaining the image frame included in the first videodata, the processor 240 may display information that the image framecorresponds to the key frame on the display 110. The processor 240 maydisplay an indication through a separate UI or edge lighting in theexecution screen of the first application 210 on the display 110, outputan audio notification through a speaker, or output a notificationthrough an LED.

In response to receiving a user input to start recording video, theprocessor 240 may repeat steps 1303 to 1317.

In step 1318, the electronic device may wait to receive a user input.For example, the video recording module 219 may wait for a user input tostop recording video.

In step 1319, the video recording module 219 may receive the user inputto stop recording the video.

FIG. 14 is a signal flow diagram illustrating a method using a secondapplication in an electronic device according to an embodiment.

As described above, using the second application 220, the processor 240may receive a user input that sets a second object of interest, which isdifferent from a first object of interest, in a plurality of imageframes included first video data, generate third video data based on atleast the second object of interest from the first video data, and storethe third video data in the memory 250.

Referring to FIG. 14 , the electronic device may wait to receive a userinput in step 1401. For example, the main module 221 may wait for a userinput for editing start.

In step 1402, the main module 221 may receive the user input for theediting start. For example, the main module 221 may display a ‘loadvideo’ button in an execution start screen of the second application 220on the display 110, and receive a user's touch input to the button.

In step 1403, the main module 221 may request the first video data fromthe memory 250.

In step 1404, the memory 250 may provide the first video data to themain module 221. The memory 250 may provide the main module 221 with atleast one information of information of at least one object extractedfrom the plurality of the image frames included in the first video data,key frame information, first object of interest information, or firstregion of interest information, together with the first video data.

In step 1405, the main module 221 may display the first video data, theat least one object information, and the key frame information on thedisplay 110. For example, the main module 221 may display the at leastone object information in a rectangular form on the display 110, anddisplay the key frame information through a key frame indicationpositioned inside a progress bar on the display 110. The main module 221may display the first region of interest information on the display 110.The main module 221 may display a region included in the first region ofinterest and a region not included in the first region of interest todistinguish them through lines or shade.

In step 1406, the main module 221 may request tracking targetrecommendation from the tracking target recommending module 227.

In step 1407, the tracking target recommending module 227 may calculatea tracking target. For example, the tracking target recommending module227 may extract at least one object from the plurality of the imageframes included in the first video data. The at least one objectextracted at the tracking target recommending module 227 may bedifferent from the at least one object extracted through the firstapplication 210.

In step 1408, the tracking target recommending module 227 may providetracking target information to the main module 221. Based on the objectnewly extracted according to calculating the tracking target at thetracking target recommending module 227, the region of interestreconfiguring module 223 may calculate an image frame corresponding tothe key frame, update the key frame information, and provide the updatedkey frame information to the main module 221.

In step 1409, the main module 221 may display the tracking target on thedisplay 110.

Upon determining that the at least one object information extracted inthe first application 210 and obtained from the memory 250 together withthe first video data is not sufficient or not appropriate, the mainmodule 221 may request the tracking target recommendation from thetracking target recommending module 227 and newly extract at least oneobject included in the image frame.

Upon determining that the at least one object information extracted inthe first application 210 and obtained from the memory 250 together withthe first video data is sufficient, the main module 221 may omit steps1406 through 1409.

In step 1410, the electronic device 100 may wait to receive a userinput. For example, the main module 221 may wait for a user input thatsets a second object of interest.

In step 1411, the main module 221 may receive the user input thatidentifies the second object of interest. The main module 221 may waitfor the user input that sets the second object of interest differentfrom the first object of interest. The main module 221 may receive auser input for modifying the position or the size of the region ofinterest, or a user input for adding, removing, or moving the key frame,instead of receiving a user input for setting the second object ofinterest different from the object of interest.

In step 1411, the main module 221 may receive a user input that sets thesecond object of interest in the image frame corresponding to the keyframe. The user may set the second object of interest in the image framecorresponding to the key frame among the plurality of the image framesincluded in the first video data.

In step 1412, the main module 221 may provide information of the secondobject of interest to the region of interest reconfiguring module 223.The main module 221 may provide the region of interest reconfiguringmodule 223 with information of the modified region of interest, orinformation of the modified key frame.

In step 1413, the region of interest reconfiguring module 223 maydetermine a second region of interest. The region of interestreconfiguring module 223 may determine the second region of interestincluding at least the second object of interest based on the secondobject of interest information obtained from the main module 221.

In response to a user input that determines the second object ofinterest in the image frame corresponding to the key frame, the regionof interest reconfiguring module 223 may determine the second region ofinterest in the image frame corresponding to the key frame, anddetermine the second region of interest also in the image frame notcorresponding to the key frame.

In step 1414, the region of interest reconfiguring module 223 mayprovide information of the second region of interest to the main module221.

In step 1415, the electronic device may wait to receive a user input,e.g., a user input indicating editing completion.

In step 1416, the main module 221 may receive the user input indicatingthe editing is completed.

In step 1417, the main module 221 may provide the video recording module229 with the first video data and the second region of interestinformation. The main module 221 may provide the video recording module229 with the modified key frame information.

In step 1418, the video recording module 229 may store third video datain the memory 250. The video recording module 229 may generate the thirdvideo data based on the obtained first video data and the second regionof interest, and store the third video data in the memory 250.

FIG. 15 illustrates an electronic device 1501 in a network environment1500 according to an embodiment.

Referring to FIG. 15 , the electronic device 1501 in the networkenvironment 1500 may communicate with an electronic device 1502 via afirst network 1598 (e.g., a short-range wireless communication network),or at least one of an electronic device 1504 or a server 1508 via asecond network 1599 (e.g., a long-range wireless communication network).The electronic device 1501 may communicate with the electronic device1504 via the server 1508. According to an embodiment, the electronicdevice 1501 may include a processor 1520, memory 1530, an input module1550, a sound output module 1555, a display module 1560, an audio module1570, a sensor module 1576, an interface 1577, a connecting terminal1578, a haptic module 1579, a camera module 1580, a power managementmodule 1588, a battery 1589, a communication module 1590, a subscriberidentification module (SIM) 1596, or an antenna module 1597. In someembodiments, at least one of the components (e.g., the connectingterminal 1578) may be omitted from the electronic device 1501, or one ormore other components may be added in the electronic device 1501. Insome embodiments, some of the components (e.g., the sensor module 1576,the camera module 1580, or the antenna module 1597) may be implementedas a single component (e.g., the display module 1560).

The processor 1520 may execute, for example, software (e.g., a program1540) to control at least one other component (e.g., a hardware orsoftware component) of the electronic device 1501 coupled with theprocessor 1520, and may perform various data processing or computation.According to one embodiment, as at least part of the data processing orcomputation, the processor 1520 may store a command or data receivedfrom another component (e.g., the sensor module 1576 or thecommunication module 1590) in volatile memory 1532, process the commandor the data stored in the volatile memory 1532, and store resulting datain non-volatile memory 1534. According to an embodiment, the processor1520 may include a main processor 1521 (e.g., a central processing unit(CPU) or an AP), or an auxiliary processor 1523 (e.g., a graphicsprocessing unit (GPU), a neural processing unit (NPU), an ISP, a sensorhub processor, or a CP) that is operable independently from, or inconjunction with, the main processor 1521. For example, when theelectronic device 1501 includes the main processor 1521 and theauxiliary processor 1523, the auxiliary processor 1523 may be adapted toconsume less power than the main processor 1521, or to be specific to aspecified function. The auxiliary processor 1523 may be implemented asseparate from, or as part of the main processor 1521.

The auxiliary processor 1523 may control at least some of functions orstates related to at least one component (e.g., the display module 1560,the sensor module 1576, or the communication module 1590) among thecomponents of the electronic device 1501, instead of the main processor1521 while the main processor 1521 is in an inactive (e.g., sleep)state, or together with the main processor 1521 while the main processor1521 is in an active state (e.g., executing an application). Theauxiliary processor 1523 (e.g., an ISP or a CP) may be implemented aspart of another component (e.g., the camera module 1580 or thecommunication module 1590) functionally related to the auxiliaryprocessor 1523. According to an embodiment, the auxiliary processor 1523(e.g., the NPU) may include a hardware structure specified forartificial intelligence model processing. An artificial intelligencemodel may be generated by machine learning. Such learning may beperformed, e.g., by the electronic device 1501 where the artificialintelligence is performed or via a separate server (e.g., the server1508). Learning algorithms may include, but are not limited to, e.g.,supervised learning, unsupervised learning, semi-supervised learning, orreinforcement learning. The artificial intelligence model may include aplurality of artificial neural network layers. The artificial neuralnetwork may be a deep neural network (DNN), a convolutional neuralnetwork (CNN), a recurrent neural network (RNN), a restricted Boltzmannmachine (RBM), a deep belief network (DBN), a bidirectional recurrentDNN (BRDNN), deep Q-network or a combination of two or more thereof butis not limited thereto. The artificial intelligence model may,additionally or alternatively, include a software structure other thanthe hardware structure.

The memory 1530 may store various data used by at least one component(e.g., the processor 1520 or the sensor module 1576) of the electronicdevice 1501. The various data may include, for example, software (e.g.,the program 1540) and input data or output data for a command relatedthereto. The memory 1530 may include the volatile memory 1532 or thenon-volatile memory 1534.

The program 1540 may be stored in the memory 1530 as software, and mayinclude, for example, an operating system (OS) 1542, middleware 1544, oran application 1546.

The input module 1550 may receive a command or data to be used byanother component (e.g., the processor 1520) of the electronic device1501, from the outside (e.g., a user) of the electronic device 1501. Theinput module 1550 may include, for example, a microphone, a mouse, akeyboard, a key (e.g., a button), or a digital pen (e.g., a stylus pen).

The sound output module 1555 may output sound signals to the outside ofthe electronic device 1501. The sound output module 1555 may include,for example, a speaker or a receiver. The speaker may be used forgeneral purposes, such as playing multimedia or playing record. Thereceiver may be used for receiving incoming calls. The receiver may beimplemented as separate from, or as part of the speaker.

The display module 1560 may visually provide information to the outside(e.g., a user) of the electronic device 1501. The display module 1560may include, for example, a display, a hologram device, or a projectorand control circuitry to control a corresponding one of the display,hologram device, and projector. The display module 1560 may include atouch sensor adapted to detect a touch, or a pressure sensor adapted tomeasure the intensity of force incurred by the touch.

The audio module 1570 may convert a sound into an electrical signal andvice versa. According to an embodiment, the audio module 1570 may obtainthe sound via the input module 1550, or output the sound via the soundoutput module 1555 or a headphone of an external electronic device 1502directly (e.g., wiredly) or wirelessly coupled with the electronicdevice 1501.

The sensor module 1576 may detect an operational state (e.g., power ortemperature) of the electronic device 1501 or an environmental state(e.g., a state of a user) external to the electronic device 1501, andthen generate an electrical signal or data value corresponding to thedetected state. According to an embodiment, the sensor module 1576 mayinclude, for example, a gesture sensor, a gyro sensor, an atmosphericpressure sensor, a magnetic sensor, an acceleration sensor, a gripsensor, a proximity sensor, a color sensor, an IR sensor, a biometricsensor, a temperature sensor, a humidity sensor, or an illuminancesensor.

The interface 1577 may support one or more specified protocols to beused for the electronic device 1501 to be coupled with the externalelectronic device 1502 directly (e.g., wiredly) or wirelessly. Theinterface 1577 may include, for example, a high definition multimediainterface (HDMI), a universal serial bus (USB) interface, a securedigital (SD) card interface, or an audio interface.

A connecting terminal 1578 may include a connector via which theelectronic device 1501 may be physically connected with the externalelectronic device (e.g., the electronic device 1502). According to anembodiment, the connecting terminal 1578 may include, for example, anHDMI connector, a USB connector, an SD card connector, or an audioconnector (e.g., a headphone connector).

The haptic module 1579 may convert an electrical signal into amechanical stimulus (e.g., a vibration or a movement) or electricalstimulus which may be recognized by a user via his tactile sensation orkinesthetic sensation. The haptic module 1579 may include, for example,a motor, a piezoelectric element, or an electric stimulator.

The camera module 1580 may capture a still image or moving images. Thecamera module 1580 may include one or more lenses, image sensors, ISPs,or flashes.

The power management module 1588 may manage power supplied to theelectronic device 1501. The power management module 1588 may beimplemented as at least part of, for example, a power managementintegrated circuit (PMIC).

The battery 1589 may supply power to at least one component of theelectronic device 1501. The battery 1589 may include, for example, aprimary cell which is not rechargeable, a secondary cell which isrechargeable, or a fuel cell.

The communication module 1590 may support establishing a direct (e.g.,wired) communication channel or a wireless communication channel betweenthe electronic device 1501 and the external electronic device (e.g., theelectronic device 1502, the electronic device 1504, or the server 1508)and performing communication via the established communication channel.The communication module 1590 may include one or more CPs that areoperable independently from the processor 1520 (e.g., the AP) andsupports a direct (e.g., wired) communication or a wirelesscommunication. According to an embodiment, the communication module 1590may include a wireless communication module 1592 (e.g., a cellularcommunication module, a short-range wireless communication module, or aglobal navigation satellite system (GNSS) communication module) or awired communication module 1594 (e.g., a local area network (LAN)communication module or a power line communication (PLC) module). Acorresponding one of these communication modules may communicate withthe external electronic device via the first network 1598 (e.g., ashort-range communication network, such as Bluetooth™, wireless-fidelity(Wi-Fi) direct, or IR data association (IrDA)) or the second network1599 (e.g., a long-range communication network, such as a legacycellular network, a 5^(th) generation (5G) network, a next-generationcommunication network, the Internet, or a computer network (e.g., LAN orwide area network (WAN)). These various types of communication modulesmay be implemented as a single component (e.g., a single chip), or maybe implemented as multi components (e.g., multi chips) separate fromeach other. The wireless communication module 1592 may identify andauthenticate the electronic device 1501 in a communication network, suchas the first network 1598 or the second network 1599, using subscriberinformation (e.g., international mobile subscriber identity (IMSI))stored in the SIM 1596.

The wireless communication module 1592 may support a 5G network, after a4^(th) generation (4G) network, and next-generation communicationtechnology, e.g., new radio (NR) access technology. The NR accesstechnology may support enhanced mobile broadband (eMBB), massive machinetype communications (mMTC), or ultra-reliable and low-latencycommunications (URLLC). The wireless communication module 1592 maysupport a high-frequency band (e.g., the mmWave band) to achieve, e.g.,a high data transmission rate. The wireless communication module 1592may support various technologies for securing performance on ahigh-frequency band, such as, e.g., beamforming, massive multiple-inputand multiple-output (MIMO), full dimensional MIMO (FD-MIMO), arrayantenna, analog beam-forming, or large scale antenna. The wirelesscommunication module 1592 may support various requirements specified inthe electronic device 1501, an external electronic device (e.g., theelectronic device 1504), or a network system (e.g., the second network1599). According to an embodiment, the wireless communication module1592 may support a peak data rate (e.g., 20 Gbps or more) forimplementing eMBB, loss coverage (e.g., 164 dB or less) for implementingmMTC, or U-plane latency (e.g., 0.5 ms or less for each of downlink (DL)and uplink (UL), or a round trip of 1 ms or less) for implementingURLLC.

The antenna module 1597 may transmit or receive a signal or power to orfrom the outside (e.g., the external electronic device) of theelectronic device 1501. The antenna module 1597 may include an antennaincluding a radiating element composed of a conductive material or aconductive pattern formed in or on a substrate (e.g., a printed circuitboard (PCB)). According to an embodiment, the antenna module 1597 mayinclude a plurality of antennas (e.g., array antennas). In such a case,at least one antenna appropriate for a communication scheme used in thecommunication network, such as the first network 1598 or the secondnetwork 1599, may be selected, for example, by the communication module1590 (e.g., the wireless communication module 1592) from the pluralityof antennas. The signal or the power may then be transmitted or receivedbetween the communication module 1590 and the external electronic devicevia the selected at least one antenna. According to an embodiment,another component (e.g., a radio frequency IC (RFIC)) other than theradiating element may be additionally formed as part of the antennamodule 1597.

According to various embodiments, the antenna module 1597 may form ammWave antenna module. The mmWave antenna module may include a printedcircuit board, an RFIC disposed on a first surface (e.g., the bottomsurface) of the printed circuit board, or adjacent to the first surfaceand capable of supporting a designated high-frequency band (e.g., themmWave band), and a plurality of antennas (e.g., array antennas)disposed on a second surface (e.g., the top or a side surface) of theprinted circuit board, or adjacent to the second surface and capable oftransmitting or receiving signals of the designated high-frequency band.

At least some of the above-described components may be coupled mutuallyand communicate signals (e.g., commands or data) therebetween via aninter-peripheral communication scheme (e.g., a bus, general purposeinput and output (GPIO), serial peripheral interface (SPI), or mobileindustry processor interface (MIPI)).

According to an embodiment, commands or data may be transmitted orreceived between the electronic device 1501 and the external electronicdevice 1504 via the server 1508 coupled with the second network 1599.Each of the electronic devices 1502 or 1504 may be a device of a sametype as, or a different type, from the electronic device 1501. Accordingto an embodiment, all or some of operations to be executed at theelectronic device 1501 may be executed at one or more of the externalelectronic devices 1502, 1504, or 1508. For example, if the electronicdevice 1501 should perform a function or a service automatically, or inresponse to a request from a user or another device, the electronicdevice 1501, instead of, or in addition to, executing the function orthe service, may request the one or more external electronic devices toperform at least part of the function or the service. The one or moreexternal electronic devices receiving the request may perform the atleast part of the function or the service requested, or an additionalfunction or an additional service related to the request, and transferan outcome of the performing to the electronic device 1501. Theelectronic device 1501 may provide the outcome, with or without furtherprocessing of the outcome, as at least part of a reply to the request.To that end, a cloud computing, distributed computing, mobile edgecomputing (MEC), or client-server computing technology may be used, forexample. The electronic device 1501 may provide ultra low-latencyservices using, e.g., distributed computing or MEC. In anotherembodiment, the external electronic device 1504 may include anInternet-of-things (IoT) device. The server 1508 may be an intelligentserver using machine learning and/or a neural network. According to anembodiment, the external electronic device 1504 or the server 1508 maybe included in the second network 1599. The electronic device 1501 maybe applied to intelligent services (e.g., smart home, smart city, smartcar, or healthcare) based on 5G communication technology or IoT-relatedtechnology.

The electronic device according to various embodiments may be one ofvarious types of electronic devices. The electronic devices may include,for example, a portable communication device (e.g., a smartphone), acomputer device, a portable multimedia device, a portable medicaldevice, a camera, a wearable device, or a home appliance. According toan embodiment of the disclosure, the electronic devices are not limitedto those described above.

It should be appreciated that various embodiments of the presentdisclosure and the terms used therein are not intended to limit thetechnological features set forth herein to particular embodiments andinclude various changes, equivalents, or replacements for acorresponding embodiment. With regard to the description of thedrawings, similar reference numerals may be used to refer to similar orrelated elements. It is to be understood that a singular form of a nouncorresponding to an item may include one or more of the things, unlessthe relevant context clearly indicates otherwise.

As used herein, each of such phrases as “A or B,” “at least one of A andB,” “at least one of A or B,” “A, B, or C,” “at least one of A, B, andC,” and “at least one of A, B, or C,” may include any one of, or allpossible combinations of the items enumerated together in acorresponding one of the phrases. As used herein, such terms as “1st”and “2nd,” or “first” and “second” may be used to simply distinguish acorresponding component from another, and does not limit the componentsin other aspect (e.g., importance or order). It is to be understood thatif an element (e.g., a first element) is referred to, with or withoutthe term “operatively” or “communicatively”, as “coupled with,” “coupledto,” “connected with,” or “connected to” another element (e.g., a secondelement), it means that the element may be coupled with the otherelement directly (e.g., wiredly), wirelessly, or via a third element.

As used in connection with various embodiments of the disclosure, theterm “module” may include a unit implemented in hardware, software, orfirmware, and may interchangeably be used with other terms, for example,“logic,” “logic block,” “part,” or “circuitry”. A module may be a singleintegral component, or a minimum unit or part thereof, adapted toperform one or more functions. For example, according to an embodiment,the module may be implemented in a form of an application-specific IC(ASIC).

Various embodiments as set forth herein may be implemented as software(e.g., the program 1540) including one or more instructions that arestored in a storage medium (e.g., internal memory 1536 or externalmemory 1538) that is readable by a machine (e.g., the electronic device1501). For example, a processor (e.g., the processor 1520) of themachine (e.g., the electronic device 1501) may invoke at least one ofthe one or more instructions stored in the storage medium, and executeit, with or without using one or more other components under the controlof the processor. This allows the machine to be operated to perform atleast one function according to the at least one instruction invoked.The one or more instructions may include a code generated by a complieror a code executable by an interpreter. The machine-readable storagemedium may be provided in the form of a non-transitory storage medium.Wherein, the term “non-transitory” simply means that the storage mediumis a tangible device, and does not include a signal (e.g., anelectromagnetic wave), but this term does not differentiate betweenwhere data is semi-permanently stored in the storage medium and wherethe data is temporarily stored in the storage medium.

A method according to various embodiments of the disclosure may beincluded and provided in a computer program product. The computerprogram product may be traded as a product between a seller and a buyer.The computer program product may be distributed in the form of amachine-readable storage medium (e.g., compact disc read only memory(CD-ROM)), or be distributed (e.g., downloaded or uploaded) online viaan application store (e.g., PlayStore™), or between two user devices(e.g., smart phones) directly. If distributed online, at least part ofthe computer program product may be temporarily generated or at leasttemporarily stored in the machine-readable storage medium, such asmemory of the manufacturer's server, a server of the application store,or a relay server.

According to various embodiments, each component (e.g., a module or aprogram) of the above-described components may include a single entityor multiple entities, and some of the multiple entities may beseparately disposed in different components. According to variousembodiments, one or more of the above-described components may beomitted, or one or more other components may be added. Alternatively oradditionally, a plurality of components (e.g., modules or programs) maybe integrated into a single component. In such a case, according tovarious embodiments, the integrated component may still perform one ormore functions of each of the plurality of components in the same orsimilar manner as they are performed by a corresponding one of theplurality of components before the integration. According to variousembodiments, operations performed by the module, the program, or anothercomponent may be carried out sequentially, in parallel, repeatedly, orheuristically, or one or more of the operations may be executed in adifferent order or omitted, or one or more other operations may beadded.

FIG. 16 is a block diagram 1600 illustrating the camera module 1580according to an embodiment.

Referring to FIG. 16 , the camera module 1580 includes a lens assembly1610, a flash 1620, an image sensor 1630, an image stabilizer 1640,memory 1650 (e.g., buffer memory), and an ISP 1660. The lens assembly1610 may collect light emitted or reflected from an object whose imageis to be taken. The lens assembly 1610 may include one or more lenses.The camera module 1580 may include a plurality of lens assemblies 1610.In such a case, the camera module 1580 may form a dual camera, a360-degree camera, or a spherical camera. Some of the plurality of lensassemblies 1610 may have the same lens attribute (e.g., view angle,focal length, AF, f number, or optical zoom), or at least one lensassembly may have one or more lens attributes different from those ofanother lens assembly. The lens assembly 1610 may include a wide-anglelens or a telephoto lens.

The flash 1620 may emit light that is used to reinforce light reflectedfrom an object. The flash 1620 may include one or more LEDs (e.g., ared-green-blue (RGB) LED, a white LED, an IR LED, or an ultraviolet (UV)LED) or a xenon lamp. The image sensor 1630 may obtain an imagecorresponding to an object by converting light emitted or reflected fromthe object and transmitted via the lens assembly 1610 into an electricalsignal. The image sensor 1630 may include one selected from imagesensors having different attributes, such as an RGB sensor, ablack-and-white (BW) sensor, an IR sensor, or a UV sensor, a pluralityof image sensors having the same attribute, or a plurality of imagesensors having different attributes. Each image sensor included in theimage sensor 1630 may be implemented using a charged coupled device(CCD) sensor or a complementary metal oxide semiconductor (CMOS) sensor.

The image stabilizer 1640 may move the image sensor 1630 or at least onelens included in the lens assembly 1610 in a particular direction, orcontrol an operational attribute (e.g., adjust the read-out timing) ofthe image sensor 1630 in response to the movement of the camera module1580 or an electronic device including the camera module 1580. Thisallows compensating for at least part of a negative effect (e.g., imageblurring) by the movement on an image being captured.

The image stabilizer 1640 may sense such a movement by the camera module1580 or the electronic device using a gyro sensor or an accelerationsensor disposed inside or outside the camera module 1580. The imagestabilizer 1640 may be implemented as an optical image stabilizer.

The memory 1650 may store, at least temporarily, at least part of animage obtained via the image sensor 1630 for a subsequent imageprocessing task. For example, if image capturing is delayed due toshutter lag or multiple images are quickly captured, a raw imageobtained (e.g., a Bayer-patterned image, a high-resolution image) may bestored in the memory 1650, and its corresponding copy image (e.g., alow-resolution image) may be previewed via a display device. Thereafter,if a specified condition is met (e.g., by a user's input or systemcommand), at least part of the raw image stored in the memory 1650 maybe obtained and processed, for example, by the ISP 1660. The memory 1650may be configured as at least part of a memory of the electronic deviceor as a separate memory that is operated independently from the memoryof the electronic device.

The ISP 1660 may perform one or more image processing with respect to animage obtained via the image sensor 1630 or an image stored in thememory 1650. The one or more image processing may include, for example,depth map generation, 3D modeling, panorama generation, feature pointextraction, image synthesizing, or image compensation (e.g., noisereduction, resolution adjustment, brightness adjustment, blurring,sharpening, or softening). Additionally or alternatively, the ISP 1660may perform control (e.g., exposure time control or read-out timingcontrol) with respect to at least one (e.g., the image sensor 1630) ofthe components included in the camera module 1580. An image processed bythe ISP 1660 may be stored back in the memory 1650 for furtherprocessing, or may be provided to an external component outside thecamera module 1580. The ISP 1660 may be configured as at least part of aprocessor of the electronic device, or as a separate processor that isoperated independently from the processor of the electronic device. Ifthe ISP 1660 is configured as a separate processor from the processor ofthe electronic device, at least one image processed by the ISP 1660 maybe displayed, by the processor of the electronic device, via the displaydevice as it is or after being further processed.

According to an embodiment, an electronic device may include a pluralityof camera modules having different attributes or functions. At least oneof the plurality of camera modules may form a wide-angle camera and atleast another of the plurality of camera modules may form a telephotocamera. Similarly, at least one of the plurality of camera modules mayform a front camera and at least another of the plurality of cameramodules may form a rear camera.

An electronic device according to an embodiment may include a camera, amemory, and a processor. The processor may obtain first video datathrough the camera, while obtaining the first video data, set a firstobject of interest in a plurality of image frames included in the firstvideo data, store second video data generated based on the first objectof interest from the first video data in the memory, after generatingthe second video data, receive a user input which sets a second objectof interest different from the first object of interest in the pluralityof the image frames included in the first video data, and in response toreceiving the user input, store third video data generated based on atleast the second object of interest from the first video data in thememory.

The processor may, while obtaining the first video data, extract atleast one object from the plurality of the image frames included in thefirst video data, set the first object of interest in the extracted atleast one object, determine a first region of interest including thefirst object of interest in the plurality of the image frames, andgenerate the second video data based on the first region of interest.

The processor may store information of the at least one object togetherwith the first video data in the memory.

The processor may receive the user input for setting the second objectof interest among the at least one object, determine a second region ofinterest including at least the second object of interest in theplurality of the image frames, and generate the third video data basedon the second region of interest.

The at least one processor may, while obtaining the first video data,obtain key frame information corresponding to an image frame in whichthe at least one object is extracted in a pre-designated manner from theplurality of the image frames included in the first video data, andstore the key frame information together with the first video data inthe memory.

The processor may receive the user input for setting the second objectof interest in an image frame corresponding to the key frame among theplurality of the image frames included in the first video data, and inresponse to receiving the user input, generate the third video data.

The electronic device may include a display electrically connected withthe processor. The processor may, before obtaining the first video data,obtain an image including the at least one object through the camera,display the image on the display, and receive the user input for settingthe first object of interest among the at least one object included inthe image.

The electronic device may include a display electrically connected withthe processor. The processor may, while obtaining the first video data,display the second video data as a preview on the display.

An operating method of an electronic device according to an embodimentmay include obtaining first video data through a camera included in theelectronic device, while the obtaining first video data, setting a firstobject of interest in a plurality of image frames included in the firstvideo data, storing second video data generated based on the firstobject of interest from the first video data in a memory included in theelectronic device, after generating the second video data, receiving auser input which sets a second object of interest different from thefirst object of interest in the plurality of the image frames includedin the first video data, and in response to receiving the user input,storing third video data generated based on at least the second objectof interest from the first video data in the memory.

The operating method of the electronic device may include whileobtaining the first video data, extracting at least one object from theplurality of the image frames included in the first video data, settingthe first object of interest in the extracted at least one object, anddetermining a first region of interest including the first object ofinterest in the plurality of the image frames, and generating the secondvideo data based on the first region of interest.

The operating method of the electronic device may include storinginformation of the at least one object together with the first videodata in the memory.

The operating method of the electronic device may include receiving theuser input for setting the second object of interest among the at leastone object, determining a second region of interest including at leastthe second object of interest in the plurality of the image frames, andgenerating the third video data based on the second region of interest.

The operating method of the electronic device may include, whileobtaining the first video data, obtaining key frame informationcorresponding to an image frame in which the at least one object isextracted in a pre-designated manner from the plurality of the imageframes included in the first video data, and storing the key frameinformation together with the first video data in the memory.

The operating method of the electronic device may include receiving theuser input for setting the second object of interest in an image framecorresponding to the key frame among the plurality of the image framesincluded in the first video data, and in response to receiving the userinput, generating the third video data.

The operating method of the electronic device may include, beforeobtaining the first video data, obtaining an image including at leastone object through the camera, displaying the image on a displayincluded in the electronic device, and receiving the user input forsetting the first object of interest among the at least one objectincluded in the image.

An electronic device according to an embodiment may include a camera, amemory, and a processor. The processor may, using a first application,obtain first video data through the camera, sets a first object ofinterest in a plurality of image frames included in the first videodata, and stores second video data generated based on the first objectof interest from the first video data in the memory second, and using asecond application, receive a user input which sets a second object ofinterest different from the first object of interest in the plurality ofthe image frames included in the first video data, and stores thirdvideo data generated based on at least the second object of interestfrom the first video data in the memory.

The processor may, using the first application, while obtaining thefirst video data, extract at least one object from the plurality of theimage frames included in the first video data, obtain key frameinformation corresponding to an image frame in which the at least oneobject is extracted in a pre-designated manner from the plurality of theimage frames, and stores information of the at least one object and thekey frame information together with the first video data in the memory.

The processor may, using the second application, generate the thirdvideo data different from the second video data through the first videodata, the at least one object information, and the key frameinformation.

The processor may, using the second application, receive the user inputfor setting at least a part of the at least one object to the secondobject of interest, in an image frame corresponding to the key frameamong the plurality of the image frames included in the first videodata, in response to receiving the user input, determine a region ofinterest including at least the second object of interest in the imageframe corresponding to the key frame, and generate the third video databased on the region of interest.

The processor may, using the second application, in response toreceiving the user input, calculate the region of interest in an imageframe not corresponding to the key frame among the plurality of theimage frames included in the first video data, and generate the thirdvideo data based on the region of interest.

While the disclosure has been shown and described with reference tocertain embodiments thereof, it will be understood by those skilled inthe art that various changes in form and details may be made thereinwithout departing from the scope of the disclosure. Therefore, the scopeof the disclosure should not be defined as being limited to theembodiments, but should be defined by the appended claims andequivalents thereof.

What is claimed is:
 1. An electronic device, comprising: a camera; amemory; and a processor configured to: obtain first video data throughthe camera, while obtaining the first video data, determine a firstobject of interest in a plurality of image frames included in the firstvideo data, store, in the memory, second video data generated from thefirst video data based on the first object of interest, after generatingthe second video data, receive a user input for identifying a secondobject of interest, different from the first object of interest, in theplurality of the image frames included in the first video data, and inresponse to receiving the user input, stores, in the memory, third videodata generated from the first video data based on the second object ofinterest.
 2. The electronic device of claim 1, wherein the processor isfurther configured to: while obtaining the first video data, extract atleast one object from the plurality of the image frames included in thefirst video data, determine the first object of interest in theextracted at least one object, determine a first region of interestincluding the first object of interest in the plurality of the imageframes, and generate the second video data based on the first region ofinterest.
 3. The electronic device of claim 2, wherein the processor isfurther configured to store, in the memory, information of the at leastone object with the first video data.
 4. The electronic device of claim3, wherein the processor is further configured to: receive the userinput for identifying the second object of interest among the at leastone object, determine a second region of interest including the secondobject of interest in the plurality of the image frames, and generatethe third video data based on the second region of interest.
 5. Theelectronic device of claim 3, wherein the processor is furtherconfigured to: while obtaining the first video data, obtain key frameinformation corresponding to an image frame in which the at least oneobject is extracted in a pre-designated manner from the plurality of theimage frames included in the first video data, and store, in the memory,the key frame information with the first video data.
 6. The electronicdevice of claim 5, wherein the processor is further configured to:receive the user input for identifying the second object of interest inan image frame corresponding to the key frame among the plurality of theimage frames included in the first video data, and in response toreceiving the user input, generate the third video data.
 7. Theelectronic device of claim 1, further comprising a display, wherein theprocessor is further configured to: before obtaining the first videodata, obtain an image including the at least one object through thecamera, display the image on the display, and receive a user input fordetermining the first object of interest among the at least one objectincluded in the image.
 8. The electronic device of claim 1, furthercomprising a display, wherein the processor is further configured to,while obtaining the first video data, display the second video data as apreview on the display.
 9. A method performed by an electronic device,the method comprising: obtaining first video data through a cameraincluded in the electronic device; while the obtaining first video data,setting a first object of interest in a plurality of image framesincluded in the first video data; storing, in a memory included in theelectronic device, second video data generated from the first video databased on the first object of interest; after generating the second videodata, receiving a user input for determining a second object ofinterest, which is different from the first object of interest, in theplurality of the image frames included in the first video data; and inresponse to receiving the user input, storing, in the memory, thirdvideo data generated from the first video data based on at least thesecond object of interest.
 10. The method of claim 9, furthercomprising: while obtaining the first video data, extracting at leastone object from the plurality of the image frames included in the firstvideo data; setting the first object of interest in the extracted atleast one object; determining a first region of interest including thefirst object of interest in the plurality of the image frames; andgenerating the second video data based on the first region of interest.11. The method of claim 10, further comprising storing, in the memory,information of the at least one object with the first video data. 12.The method of claim 11, further comprising: receiving the user input fordetermining the second object of interest among the at least one object;determining a second region of interest including at least the secondobject of interest in the plurality of the image frames; and generatingthe third video data based on the second region of interest.
 13. Themethod of claim 11, further comprising: while obtaining the first videodata, obtaining key frame information corresponding to an image frame inwhich the at least one object is extracted in a pre-designated mannerfrom the plurality of the image frames included in the first video data;and storing, in the memory, the key frame information together with thefirst video data.
 14. The method of claim 13, further comprising:receiving the user input for setting the second object of interest in animage frame corresponding to the key frame among the plurality of theimage frames included in the first video data; and in response toreceiving the user input, generating the third video data.
 15. Themethod of claim 9, further comprising: before obtaining the first videodata, obtaining, through the camera, an image including at least oneobject; displaying the image on a display included in the electronicdevice; and receiving the user input for setting the first object ofinterest among the at least one object included in the image.
 16. Anelectronic device, comprising: a camera; a memory; and a processorconfigured to: using a first application, obtain first video datathrough the camera, determine a first object of interest in a pluralityof image frames included in the first video data, and store, in thememory, second video data generated from the first video data based onthe first object of interest, and using a second application, receive auser input for determining a second object of interest, which isdifferent from the first object of interest, in the plurality of theimage frames included in the first video data, and store, in the memory,third video data generated from the first video data based on at leastthe second object of interest.
 17. The electronic device of claim 16,wherein the processor, using the first application, is furtherconfigured to: while obtaining the first video data, extract at leastone object from the plurality of the image frames included in the firstvideo data, obtain key frame information corresponding to an image framein which the at least one object is extracted in a pre-designated mannerfrom the plurality of the image frames, and store, in the memory,information of the at least one object and the key frame informationtogether with the first video data.
 18. The electronic device of claim17, wherein the processor, using the second application, is furtherconfigured to generate the third video data, which is different from thesecond video data, through the first video data, the at least one objectinformation, and the key frame information.
 19. The electronic device ofclaim 18, wherein the processor, using the second application, isfurther configured to: receive the user input for setting at least apart of the at least one object to the second object of interest, in animage frame corresponding to the key frame among the plurality of theimage frames included in the first video data, in response to receivingthe user input, determine a region of interest including at least thesecond object of interest in the image frame corresponding to the keyframe, and generate the third video data based on the region ofinterest.
 20. The electronic device of claim 19, wherein the processor,using the second application, is further configured to: in response toreceiving the user input, calculate the region of interest in an imageframe not corresponding to the key frame among the plurality of theimage frames included in the first video data, and generate the thirdvideo data based on the region of interest.